package com.example.carconsumer.controller.dl;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Api("swagger测试")
@RestController
public class SwaggerTest {

    @GetMapping(value = "/swaggerTest")
    @ApiOperation(value = "用户登录接口",notes = "验证用户的用户名和密码",httpMethod = "post", response = String.class)
    public String login(@ApiParam(name = "user",value = "用户名和密码",required = true) String name)  {
        System.out.println("swagger run/.....");

        System.out.println(name);

        return "success  swagger";
    }

}
